
package ch.hearc.coursJava.moo.thread.hello.v1;

public class HelloRunnable implements Runnable
	{

	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/

	public HelloRunnable()
		{
		// rien!
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	@Override
	public void run()
		{
		attendre(1000);
		System.out.println("Hello world from " + Thread.currentThread().getName());
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	private void attendre(long millisecondes)
		{
		try
			{
			Thread.sleep(millisecondes);
			}
		catch (InterruptedException e)
			{
			e.printStackTrace();
			}
		}

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/
	}
